<?php

/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-19 15:47:19
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-03-25 00:28:58
 */


namespace app\modules\diandi_shop\models\forms;

use Yii;
use yii\base\Model;
use yii\filters\VerbFilter;

class DiandiShopStroe extends Model
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'dd_diandi_shop_setting';
    }

    public $mobile;
    public $title;
    public $startingPrice;
    public $intro;
    public $shippingDees;
    public $address;
    public $describe;
    public $logo;
    public $banner;
    public $storeId;
    public $hotSearch;
    public $notice;
    public $surroundings;
    public $certificate;
    public $lng_lat;
    public $distance;

    /**
     * @inheritdoc
     */
    public function rules(): array
    {
        return [
            [['mobile', 'startingPrice', 'storeId', 'shippingDees', 'distance'], 'integer'],
            [['title', 'notice'], 'string', 'max' => 50],
            [['hotSearch', 'lng_lat'], 'string', 'max' => 255],
            [['surroundings', 'certificate'], 'safe'],
            [['intro', 'address', 'describe', 'logo', 'banner'], 'string', 'max' => 255],
        ];
    }


    /**
     * @inheritdoc
     */
    public function attributeLabels(): array
    {
        return [
            'title' => '商家名称',
            'intro' => '简介',
            'address' => '商家地址',
            'mobile' => '商家电话',
            'describe' => '商家详情',
            'logo' => '商家logo',
            'banner' => '横幅背景',
            'startingPrice' => '起送价',
            'shippingDees' => '配送费',
            'storeId' => '商家ID',
            'distance' => '配送范围',
            'lng_lat' => '经纬度',
            'notice' => '公告',
            'surroundings' => '商家环境',
            'certificate' => '资质证书',
            'hotSearch' => '热搜(以英文逗号隔开)'
        ];
    }
}
